package com.bigShen.pattern.observer.main;

import com.bigShen.pattern.observer.mouse.MouseService;

/**
 * @author : lei.shen
 * @date : 2018/10/7
 */
public class ObserverMainTest {

    public static void main(String[] args) {

        try {

            // 监听器的添加 可以静态映射， 也可以需要的时候  手工调用添加
            //MouseServiceCallBack mouseListener = new MouseServiceCallBack();
            //Method dbClickMethod = mouseListener.getClass().getMethod("dbClick", new Class[]{Event.class});

            MouseService mouse = new MouseService();
            //mouse.addListener(MouseEventType.ON_DBCLICK, mouseListener, dbClickMethod);

            mouse.up();

            // 一般的观察者模式, 使用动态代理， 解耦更明显

        } catch (Exception e) {
            e.printStackTrace();
        }

    }

}
